package org.example;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        String s1 = "Hello";
        String s2 = "Hello";
        String s3 = "He" + "llo";
        String s4 = new String("Hello");
        String s5 = "He" + new String("llo");
        String s6 = new String("Hello").intern();
        String s7 = "He";
        String s8 = "llo";
        String s9 = s7 + s8;

        System.out.println(s1 == s2); // ture
        System.out.println(s1 == s3); // true
        System.out.println(s1 == s4); // false
        System.out.println(s3 == s5); // false
        System.out.println(s1 == s6); // true
        System.out.println(s9 == s1); // false
        System.out.println(s9 == s4); // false
        System.out.println( "Hello World!" );
    }
}
